<?php
/*
 * Copyright (c) 2013 Eugene Kuzmenko
 *
 * Permission  is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in  the Software without restriction, including without limitation the rights
 * to  use,  copy,  modify,  merge, publish, distribute, sublicense, and/or sell
 * copies  of  the  Software,  and  to  permit  persons  to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The  above  copyright  notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE  SOFTWARE  IS  PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED,  INCLUDING  BUT  NOT  LIMITED  TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS  FOR  A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS  OR  COPYRIGHT  HOLDERS  BE  LIABLE  FOR  ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 * For more information, see <http://www.aljey.com>.
*/

namespace Fun\Jobeet\Form;

use Al\Style\Lib\Form\Form;

/**
 * Form class for Fun\Jobeet:Job
 *
 * @author Eugene Kuzmenko <mail@aljey.com>
 */
class JobForm extends Form {

  /** {@inheritDoc} */
  public $entity = 'Fun\Jobeet:Job';

  /** {@inheritDoc} */
  protected $route = 'fun_jobeet_job_form';

  /** {@inheritDoc} */
  protected $data = array (
    'type' => array (
      'type' => 'choice',
      'expanded' => true,
      'options' => array (
        'full-time' => 'Full time',
        'part-time' => 'Part time',
        'freelance' => 'Freelance',
      ),
      'label' => 'Type',
    ),
    'company' => array (
      'label' => 'Company',
    ),
    'logo' => array (
      'type' => 'file',
      'multiple' => false,
      'required' => false,
      'label' => 'Logo',
    ),
    'url' => array (
      'type' => 'url',
      'required' => false,
      'label' => 'Url',
    ),
    'position' => array (
      'label' => 'Position',
    ),
    'location' => array (
      'label' => 'Location',
    ),
    'description' => array (
      'type' => 'textarea',
      'label' => 'Description',
      'rich' => true,
    ),
    'how_to_apply' => array (
      'type' => 'textarea',
      'label' => 'How To Apply',
    ),
    'token' => array (
      'label' => 'Token',
    ),
    'is_public' => array (
      'value' => 1,
      'help' => 'job_is_public_help',
      'type' => 'choice',
      'expanded' => true,
      'required' => false,
      'label' => 'Is Public',
    ),
    'is_activated' => array (
      'type' => 'choice',
      'expanded' => true,
      'required' => false,
      'label' => 'Is Activated',
    ),
    'email' => array (
      'type' => 'email',
      'label' => 'Email',
    ),
    'expires_at' => array (
      'type' => 'datetime',
      'label' => 'Expires At',
    ),
    'created_at' => array (
      'type' => 'datetime',
      'label' => 'Created At',
    ),
    'updated_at' => array (
      'type' => 'datetime',
      'required' => false,
      'label' => 'Updated At',
    ),
    'category' => array (
      'type' => 'choice',
      'label' => 'Category',
      'assoc' => 'Fun\\Jobeet:Category',
    ),
  );

}